<?php

declare(strict_types=1);

namespace App\Request\Client\TaskEmployer;


use App\Constants\Model\Task;
use Hyperf\Validation\Request\FormRequest;
use Hyperf\Validation\Rule;

class UpdateRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'cover_image' => 'required',
            'title' => 'required',
            'product_name' => 'required',
            'description' => 'required',
            'audit_time' => 'required',
            'price' => 'required|numeric|min:0.2',
            'end_time' => 'required',
            'count' => 'required|integer|min:0|not_in:0',
            'getter_user_info' => [
                'required',
                Rule::in(
                    [
                        Task::GETTER_USER_INFO_NO,
                        Task::GETTER_USER_INFO_YES
                    ]
                )
            ],
            'hint_message' => '',
            'step_text_10' => '',
            'step_image_10' => '',
            'step_image_11' => '',
            'step_image_12' => '',
            'step_text_20' => '',
            'step_image_20' => '',
            'step_text_21' => '',
            'step_image_21' => '',
            'step_text_22' => '',
            'step_image_22' => '',
            'step_text_23' => '',
            'step_image_23' => '',
            'step_text_24' => '',
            'step_image_24' => '',
            'step_text_30' => '',
            'step_image_30' => '',
            'step_text_31' => '',
            'step_image_31' => '',
            'step_text_32' => '',
            'step_image_32' => '',
            'user_finish_time' => 'required',
            'estimated_time' => 'required',
            'tags' => '',
            'contact' => ''
        ];
    }


}